<?php

class BlogController extends Controller
{
    public function show()
    {
        //http://localhost/hdphp-xuexi/Lesson15/index.php?m=Admin&c=Blog&a=show&id=2
        //http://localhost/hdphp-xuexi/Lesson15/index.php?Admin/Blog/show/id/2
        //http://localhost/hdphp-xuexi/Lesson15/index.php/blog_1
        $db = M('blog');
        $id= Q('id',0,'intval');
        $data= $db->find($id);
        p($data);
    }
}